﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DealerJudge.Core;
using DealerJudge.Data;
using DealerJudge.Entity;

namespace DealerJudge.App
{
    public class DealerManager : IDealerManager 
    {
        private ILogger _logger;
        private IDealerData _dealerData;
        public DealerManager(ILogger logger, IDealerData dealerData)
        {
            _logger = logger;
            _dealerData = dealerData;
        }
        public List<Dealer> Search(DealerCategory dealerCategory, City city, Manufacturer manufacturer, Location location)
        {
            return _dealerData.Search(dealerCategory, city, manufacturer, location);
       }
        public List<Category> GetCategory()
        {
            return _dealerData.GetCategory();
        }

        public List<City> GetAllCities()
        {
            return _dealerData.GetAllCities();
        }

        public List<City> GetCityById(int id)
        {
            return _dealerData.GetCityById(id);
        }

        public List<City> GetCitiesByCategory(int cat_id)
        {
            return _dealerData.GetCitiesByCategory(cat_id);
        }

        public List<Manufacturer> GetManufacturerByCityAndCategory(int city_id, int cat_id)
        {
            return _dealerData.GetManufacturerByCityAndCategory(city_id, cat_id);
        }
    }
}
